function createMaterialUsage(data, productionOrderList) {
    const materialUsageList = []
    for (const productionOrder of data.productionOrder) {
        const id = (productionOrderList.find(item => item.oldCode === productionOrder['批号']) || {})['数据ID']
        const materialUsageTemplate = {
            productionOrderId: id,
            materialCode: '',
            times: 2,
            materialUseNum: 0,
            status: 1,
            bedId: 1
        }
        const auxiliaryMaterialList = data.auxiliaryMaterial.filter(item => item.订单子明细ID === productionOrder.订单明细ID)
        for (const auxiliaryMaterial of auxiliaryMaterialList) {
            const materialUsage = { ...materialUsageTemplate }
            materialUsage.materialCode = auxiliaryMaterial.货号
            materialUsage.materialUseNum = Math.floor(auxiliaryMaterial.用量 * productionOrder.件数 * 1000) / 1000
            materialUsageList.push(materialUsage)
        }
    }
    return materialUsageList
}

return {
    materialUsageList: createMaterialUsage(data, productionOrderList)
}